<template>
    <div class="goodsdesc-container">
        <h3>{{info.title}}</h3>
        <hr>
        <div class="content" v-html="info.content"></div>
    </div>
</template>
<script>
    //导入弹出框组件
    import {Toast} from 'mint-ui'

    export default {
        data() {
            return {
                id: this.$route.params.id,
                info: {},//图文数据
            };
        },
        created() {
            this.getDescInfo();
        },
        methods: {
            //http://www.liulongbin.top:3005/api/goods/getdesc
            getDescInfo() {//获取图文介绍的函数
                this.axios.get('api/goods/getdesc/'+this.id).then(result => {
                    console.log(result.data);
                    this.info = result.data.message[0];
                }).catch(result => {
                    Toast('图文介绍获取失败!!!');
                });
            }
        }
    }
</script>
<style lang="scss">
    .goodsdesc-container {
        padding: 4px;
        h3 {
            font-size: 16px;
            color: #226aff;
            text-align: center;
            margin: 15px 0;
        }
        .content {
           table{
                width: 100%;
                /deep/ img {
                    width: 100%;
                }
            }

        }
    }
</style>